package com.joysuch.wwyt.risk.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * @author zero
 * @since 2022/1/4 10:24
 */
public enum BatchDrawingEnum {
    RISK_AREA(0,"风险区域"),
    MONITORING_POINTS(1,"监测点"),
    TANK_FARM(2,"罐区"),
    VIDEO(3,"视频"),
    EQUIPMENT(4,"设备"),
    RISK_POINT(5,"风险点"),
    STORAGE_TANK(6,"储罐"),
    RISK_SOURCE(7,"重大危险源")
    ;

    private Integer code;
    
    private String value;

    BatchDrawingEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    private static final Map<Integer, BatchDrawingEnum> lookup = new HashMap<>();

    static {
        for (BatchDrawingEnum e : EnumSet.allOf(BatchDrawingEnum.class)) {
            lookup.put(e.code, e);
        }
    }
    public static BatchDrawingEnum find(Integer value) {
        return lookup.get(value);
    }
}
